package com.cuijq.ms.chaindesign.v5;


import javax.swing.text.AbstractDocument;

/**
 * @author by CuiJQ
 * @Classname Demo
 * @Description Demo Description
 * @Date 2021/5/29 11:10
 */
public class Demo {

  public static void main(String[] args) {
    SensitiveWordFilterChain filterChain = new SensitiveWordFilterChain();
    filterChain.addFilter(new AdsWordFilter());
    filterChain.addFilter(new

        SexyWordFilter());
    filterChain.addFilter(new

        PoliticalWordFilter());
    boolean legal = filterChain.filter((AbstractDocument.Content) new Content());
    if (!legal) { // 不发表
    } else { // 发表

    }
  }
}